<?php namespace App\Http\Controllers\user\uc;

use App\Http\Requests;
use App\Http\Controllers\Controller;

use Illuminate\Http\Request;
use App\Models\Area;
use Input;
use Session;
use App\Models\UserRoles;
use App\Models\MainBody;

class IndexController extends Controller {

	/**
	 * Display a listing of the resource.
	 *
	 * @return Response
	 */

	public function index()
	{
		return view('user.uc.index');
	}

	public function selectType()
	{
		// dd(Session::get("user"));
		$userRoles = UserRoles::where("id", "!=", 1)->where("id", "!=", 8)->where("id", "!=", 9)->get();
		$type = -1;
		if(Input::has("type")){
			$type = Input::get("type");
		}
		return view("user.uc.select_type", ["roles" => $userRoles, "type" => $type]);
	}


	public function getMainbody()
	{
		$data = MainBody::all()->toArray();
		return $this->json(["data" => $data]);

	}

	/**
	 * Show the form for creating a new resource.
	 *
	 * @return Response
	 */
	public function create()
	{
		//
	}



	/**
	 * Store a newly created resource in storage.
	 *
	 * @return Response
	 */
	public function store()
	{
		//
	}

	/**
	 * Display the specified resource.
	 *
	 * @param  int  $id
	 * @return Response
	 */
	public function show($id)
	{
		//
	}

	/**
	 * Show the form for editing the specified resource.
	 *
	 * @param  int  $id
	 * @return Response
	 */
	public function edit($id)
	{
		//
	}

	/**
	 * Update the specified resource in storage.
	 *
	 * @param  int  $id
	 * @return Response
	 */
	public function update($id)
	{
		//
	}

	/**
	 * Remove the specified resource from storage.
	 *
	 * @param  int  $id
	 * @return Response
	 */
	public function destroy($id)
	{
		//
	}
}
